Think of Luma as a true second character, just one with a really bad recovery but one for whom it's not that bad if it dies (12.5 seconds is the magic number and then it respawns). Luma's normals tend to be faster than Rosalina's but have less range. They generally do better knockback but a lot less damage. The Luma normals throw Luma all over the place while the Rosalina normals have disjoints to hit at those distant locations and don't really move Rosalina at all. At her core, Rosalina is a spatial control character, using her two characters with very different normals to dominate space and to have one always back up the other. I spend a lot of my matches with Luma out in front playing footsies and Rosalina hanging back waiting to punish if my opponent gets the upper hand in that battle. For me, sending Luma at my opponent is just like approaching with my other character; I'm just taking a way smaller risk (better Luma get hit than Rosalina) in exchange for having the Luma set of normals on the frontline instead of the Rosalina one. It gets really complicated to figure what is best at all times, but the pay-off is huge when it works right.
Starting out you'll probably want to keep Luma with Rosalina a lot and just get used to how that plays. You can play her like a normal character like this with Luma as basically a power-up. Start to see the situations in which Luma's presence helps you a lot versus not so much, for which moves the Rosalina hit or the Luma hit is doing what you need, and in what kinds of situations your Luma tends to die. As you get more comfortable with Rosalina and understand these things you'll find sending Luma out more and more makes a lot of sense, and you'll begin to get a feel for playing as two characters with one controller and how to balance your decision making around how it commands both of them. At some point when you're decently comfortable you should play some games just immediately sending Luma out every time it is up and not recalling it at all. This is sub-optimal of course, but it's a great way to learn how to manage Luma when he's not with Rosalina. Somewhere in all of that hopefully things will just start to make sense; as in any fighting game, learning the oddball character who is the exception to the normal rules is a lot more work than learning a typical character, but she is extremely good so this is one of those cases where the pay-off will match the effort if you put it in.