I am trying to install (2) Lutron Caseta Wireless Switches to replace two legacy light switches. This is my first attempt at replacing a light switch. When looking inside, I am a bit confused on the wiring configuration: -Why are there four white wires that are just joined together? Do they serve a purpose? -Why is only one switch grounded? -Why is there a connection from one switch direct to the other (capped with a yellow connector in this image)
The whites in the back of the box are very important. They are neutral, and you wouldn't have a circuit without them. Also it's rather fortunate they are there, because a good quality smart switch will require them.
On both switches, you have 2 wires going to a single screw terminal. This is nothing but a lazy shortcut in wiring. Those multiple wires could be replaced by a pigtail, in which case the wiring would be easier to understand. It looks like that hoppy wire is the "always hot" wire, and is commonly** color coded black, which it happens to be. The solo black wires are switched-hots going up to the lights, and they are commonly** color coded red, and I'd mark them with red tape. I'dThis will make it even easier to understand.
Most people, even freshmen like yourself, don't need equipment safety ground explained to them. The only thing you might need to know is when ground has insulation, it is green, or green/yellow stripe.
** that is common practice. The law only specifies colors for ground and neutral (white or gray). Legally a hot can be any other color. In this wiring, the switched-hot is black because they are using pre-made cables and don't have a choice for color. That's what tape is for.