There are two things you can do, one is by changing your keypad type and the second is to use a third party app .
Changing Keypad type
So lets start with this trick. On your android phone you have two types of keypad one is English US Android Keyboard (AOSP) and another is Indic keyPad (Reveire smartpad). So with the English US Android Keypad you cannot type in Hindi. To be able to type in Hindi or Marathi you need to change your Keypad type. You can do it very easily. Go to Settings on your Android phone, scroll down and click on Language & input. Now you will see something like Keyboard & input methods, just below that there is an option called Default. Now click on that and you will see one pop up box saying Chose input method. And here click on Indic KeyPad.
Now To type in Hindi or Marathi Go and click on text box you will see your keyboard layout will be changed and will look something like in the above image. Now click on the Pred On and start typing in Hindi or Marathi that is Devnagari.
Third Party App
As you see in the above image it is very easy to type with this app (Marathi Keyboard). You can download it from here http://bit.ly/16eZxS6.
Here is your bonus tip. If none of the above trick is working for you ( that will not gonna happen at all, but still!) or If you are not from the Android platform then you can use online services. Here is the list of some sites that I found across the internet for typing in Hindi or Marathi.
These two sites are really great, Give them a try! If you have any doubt or suggestion speak out in the comments below. Thank you!