Only use a soliloquy in screenwriting if you feel there is no other way to express the sentiments you wish through another plot device. A soliloquy can be a vital window into a character's mind but will only feel effective if purposeful and in keeping with the flow and style of the story.