Do you mean a screen like this?:

If you using a RPi 3 B+, it may just be out of date firmware (see here) - you need to use newer image with the right firmware such as the offical Raspbian image - older and derivative images may still need to be updated for now (e.g. OctoPrint [1] [2] [3] )
Various troubleshooting methods can be found here:
With current firmware, a coloured splash screen (actually its just
four pixels "blown up" by the GPU to full screen) is displayed after
GPU firmware (start.elf) is loaded. This should be replaced by linux
console a second later. However if the coloured screen remains, it
suggests the kernel.img file is failing to boot. Try replacing it with
a known good one.
Immediately after displaying the splash screen, the PI starts
consuming a little more current. If the PI resets at that moment, it
is an indication that the power supply isn't able to deliver the full
current your PI requires, but dips its output voltage below a minimum
when loaded with the full current the PI needs.
In some cases (Stuck on the Rainbow Screen), freezing at this point
has been fixed by adding boot_delay=1 to the config.txt file. This
can be done from a Windows PC, which should show several files in the
FAT partition on your SD card including bootcode.bin, kernel.img, and
config.txt. You can open config.txt in wordpad or any text editor. Add
boot_delay=1 and save the file. Don't forget to 'eject' the card
before removing it from the card reader. If you are reading the SD card
from a working Pi, you can edit the file with sudo nano
/boot/config.txt
Kernel Panic on boot
Text appears on screen, but then hangs with debug messages. This can
be caused by USB devices such as keyboards. Try again with nothing in
the USB.
Raspberry Pi shuts down (or restarts) soon after booting up
This is caused by a power supply producing too low a voltage. See Troubleshooting power problems
Pi boots sometimes but not always
With a known good power supply and known good SD card, the R-Pi boots
occasionally, but other times shows only a tiny green flicker from the
"OK" LED and it fails to start, even with no USB devices and no
Ethernet. This has been reported several times[4] [5] [6] and remains
an open issue. Low voltage or an improper SD card can cause it. Some
SD cards will work until they warm up slightly, and then fail[7]. When exposed to 21 C room temperature the warmest part of an uncased working R-Pi should be 41 C[8]. The wiki has a list of working SD
cards. Buy from a reliable vendor as it has been claimed that 1/3 of
all "Sandisk" labelled memory cards are counterfeit.
- It could be that the SD memory card is not making proper contact with the Raspberry Pi. Look at the SD card holder on the Raspberry Pi
carefully. At first glance it may look fine, but the contacts must be
springy and they must protrude at least 2mm as measured from the lower
edge of the holder to the top of the contact bulge. Variations happen
due to the solder process and the type of holder used. Some of the
solder residue falls into the contact cavity, restricting the
springiness and the height that the contact protrudes. You can fix
this yourself, but remember you can void your warranty. The contacts
are delicate, so be careful. Insert a needle pin under the contact
bulge and pull lightly up until the one end of the contact unclips.
Clean the cavity where the contact unclipped from any solder or other
residue by blowing into the cavity. Clip the contact back into the
cavity by lightly pushing it into the cavity. Do this for all the
contacts. Refer to these photos: Media:SDcardHolder.JPG,
Media:UnclipContact.JPG, Media:UnclippedContact.JPG
I would try other SD cards and power supplies, and check the Pi for defects, as well as different raspberry pi image. You may also want to try a different SD card reader, as some may format the card unreliably.