Does every device/software, developed for use in the cockpit, need to be certified?
The answer depends on the functionality and capability of the app. Some basic apps do not need to be certified, whilst more complicated ones will (either by the airline or by the regulator).

Tablets are split into 3 categories (these are the US FAA definitions):
1) Portable devices not mounted to the aircraft with read-only access to aircraft data.
2) Portable devices that can be mounted and can share information with aircraft systems.
3) Permanently mounted devices with access to the flight management computer.

There are also 3 classes of app:
A) Basic apps providing info such as aircraft manuals and procedures.
B) More complex apps providing some navigation info, weather info or exterior views of the aircraft.
C) More complex apps that can provide navigation information and can include 'own ship' position via GPS or the aircraft navigation platform.

Class 1 and 2 tablets can only host type A or B apps. Type A and B apps can be 'self certified' by the airline, providing that documentation on failure modes and usability is available. Some restrictions are in place for type B apps displaying, for example, weather info. Type C apps require regulator approval.

That's a brief summary, but it's very complex. Full details available
in this FAA document. Regulations worldwide vary, but most are broadly similar to those specified by the FAA.