? any single character, except a leading dot
* zero or more characters, except a leading dot
[ ] defines a class of characters ( - for range, ! to exclude)
Your two commands recursively remove directories that match the pattern. The patterns are:-
/home/??*/folder_* - files and directories called folder_ or anything starting folder_ under /home that the intermediate directory is at least two characters long
/home/?/folder_* - files and directories called folder_ or anything starting folder_ under /home that the intermediate directory is exactly one character long
Oddly, this means the same as pattern /home/?*/folder_* when you run them sequentially, however this might have been done if there are many matches and when expanded the overall rm command exceeds the maximum command length. It also ignores anything that matches zero characters for the intermediate directory, such as /home/folder_1
This will search for files (be they regular files, pipes, directories, sockets etc.) under /home called or starting folder_ and remove them if you drop the echo
This will, however remove items called /home/robin/saved/folder_1 too.
You can limit this to just look for directories by adding a -type d clause.
You can limit the depth it will search to using the -mindepth & -maxdepth clauses if your version of find supports them. If find doesn't support them, you might have to force it some other way, such as with an extended regular expression of some sort.
I encourage you to safely have a go and tell us if you get stuck. Only let the rm run once you are sure it will do exactly what you want.
You didn't specify, whether you want to use a specific shell for your script. If it is fine for you to use zsh, there is an interesting features which allows you to do globbing, but to exclude certain directory entries. Assuming that the users to exclude are 'stan' and 'olli', you could write something like
setopt local_options extended_glob
for home in /home/(*~(stan|olli))(N)
do
# Remove entries starting with name 'folder_' below directory $home
rm -rf $home/folder_*
done
The setopt command turns on the special "exclusion feature", and the (N) ensures that the loop is skipped if no files match the pattern.