In WordPress, things like widget settings, menus and other settings are stored by folder path. This means that if you change the name of the theme folder, the path won’t be valid anymore. Thus, you need to rename the theme folder like it was named before. Afterwards, you will get your widgets, settings and menus back. Just make a copy of your previous theme folder if you need it, before uploading a new theme.