How to Group Lights Together
There are many different ways to group together devices and SmartThings. Some of the most popular custom smart apps involve lighting groups, including saving scenes with many different features like different dim levels for different lights, different colors, etc. To find those, use the quick browse list for lighting to look in the community created smart apps section of the community forum ].
This how to is just for the most basic form of grouping. Say you have three lights in one room and you want them to all come on as a group, and go off as a group.. You can use the official "smart lighting" feature of the SmartThings mobile app to do this.
First, pick one light to be the master light. All of the other lights in the group will follow this light when it changes.
1. Install Smart Lighting from the marketplace if you haven't done so already. You only have to do this once.
Official support article on installing Smart Lighting 
4. Select all of the lights that you want to be in the group except for the master.
5. The next choices you will get depend on the type of light that you picked in step four. If they are just plain on/off switches, then those are the only options you will see. If they are also dimmers, you will also see an option to "turn on and set level"
6. Now that you have selected the lights for the group and said how you want them to behave together, you have to define when you want the group action to occur. This is where you will pick the master light.
7. Give the lighting automation a name like "group living room lights" and save it.
From now on, these lights will act together. If you have any problem, because this is an official feature, you can contact support for help.
Putting a Light in More than one Group
You can also use this simple method to put a light into more than one group, but only if you use a virtual switch as the master. So you could have a virtual switch that represented "bedroom lights" and another virtual switch that represented "upstairs lights." Use a separate smart lighting automation for each. That way you could include your physical Bedroom lights in both groups. You could also use a third virtual switch to represent "bedtime" and set up a smart lighting automation that assigned one light from the bedroom, one light from the bathroom, and the hallway light to follow the "bedtime" Virtual master. So this method gives you a lot of options, but only for on/off. Not dimming or color management.
There is a forum FAQ on how to create a virtual device. . Once you have created the virtual device, it will show up in your list of switches just like any other switch and then you can select it as the master when you set up a smart lighting automation.
Using the Group with routines, other Smartapps, or IFTTT
Once you have set up the group using a smart lighting automation, you can then use the master switch in other rules and the entire group will follow along. So you can use it in a routine, in a smartapp like core, or when you create an IFTTT recipe. Just reference the master, and the group will follow. This is true whether the master is a physical switch, a smart bulb, or a virtual switch.
If you have an echo, you can also use echo groups in a similar way. However, echo grouping will only apply when you are talking to the echo. It won't change the way the lights work within SmartThings.
More advanced options:
If you want more advanced options, like color management or setting scenes where different lights are at different dim levels, You can find custom code in the forum in the community created smart apps section 
Community discussion topic