Question: I am traveling from Stockholm to Dubai and Dubai to Nairobi using two different airlines. I have Kenyan nationality and can't go through Immigration because I don't have a Dubai visa. 

How I will get my luggage?

Answer: 
If your luggage is not checked through, then I am afraid you will have to collect it and to do that you'll need a visa as the baggage carousels are *after* the immigration counters.

The sequence is:

1. De-plane.
2. Depending on the terminal, you'll have a long walk (and then go down a few flights of stairs) or a short one, or really no walk at all (if you are at Terminal 2, as the bus will drop you right at the immigration counter).
3. The bank counter where you pay for the on-arrival visa will be on your right (Terminal 3, 2), or on your left (Terminal 1).
4. Go through immigration, then turn right to go through the metal detectors where they will scan your carryon luggage (in Terminal 3 its a straight walk).
5. Collect your baggage.
6. Go through either the Green Channel or the Red Channel (depending on what you have to declare).
7. Welcome to Dubai.

I'm afraid you'll need a visa - the good news is a transit visa is available at the counter if you can show a continuing ticket/itinerary.
Do you plan to actually immigrate into Dubai (will you leave the airport)? Without a visa you will not be able to leave the transit area of the airport. 

It sounds like you are just passing through Dubai on a layover. You will be forced to go through arrival security check after you deplane no matter what your Nationality is. Whether or not you are flying with airlines in the same alliance, you will need to pick up your bag from the customs baggage drop, which will be after the security check but before immigration. Don't worry you'll see a lot of people in the same situation as you. Follow the crowd if in doubt. Or just ask one of the airport staff. They speak many languages. 

The next step will depend if your itinerary was booked with the same airline or alliance or not. If your bags are checked through, your bag should already have a tag indicating your final destination (NBO). If it already has a tag for NBO, then just drop it off at the baggage intake. If not, then you will need to go to the transfer desk (still in the "sterile" zone, within the transit area) of the airline you have your final flight on to issue your luggage documents, and then you will take your tagged bag to the baggage intake. As long as your baggage has a tag with NBO marked on it, you will be OK.