Is the pressure of water in the ocean enough to cause a nuclear bomb to go critical? I understand that most nuclear weapons work on the basis of a standard explosive forcing the 2 fissionable parts together causing the nuclear reaction.
If a nuclear warhead or bomb fell into the deepest part of the ocean would the pressure eventually be such that it would force the 2 parts of the nuclear core into each other and cause an explosion, or would it be a far slower process?
 A: Depends on how we are supposed to understand your question. If you are asking what would happen with current designs of nuclear bombs at the pressure of about $10^8$ Pa, one would need to know the specific design and safety features of the gadget to answer such a question. Furthermore, your question is ambiguous as you ask about criticality in the title and about explosion in the body of the question. Can one build a nuclear device that is safe at $10^5$ Pa and critical at $10^8$ Pa? No doubt about it. As @The_Sympathizer mentioned, modulus of elasticity of plutonium is about $10^{11}$ Pa, so one can build a subcritical device that would become critical when its size decreases by about 0.1%. However, the chain reaction will cause pressure increase inside plutonium, the plutonium will start to expand, criticality will be lost, and the reaction will fizzle. So is explosion possible? Depends on your definition of explosion.
A: The internet says the pressure at the Challenger Deep is 1,000 atm, or 1.1 kbar.
Meanwhile:
The explosive experts at the National Park Service [?] https://www.nps.gov/parkhistory/online_books/npsg/explosives/Chapter2.pdf
tell us that a confined high explosive is converted into a hot gas that wants to expand by a factor 10,000 - 20,000, producing a surface pressure go 10 - 140 kbar... a lot more than the ocean.
In the implosion device, this pressure is focused onto the pit, so the compression pressure is even higher. According to https://nuclearweaponarchive.org/Library/Implsion.html , the pits is compressed by a factor of 2 to 3.
So no, the ocean isn't going to do it.
A: Interestingly, it's kinda hard to tell, but I suspect the answer is no. EDIT: yes, it's actually a no, see the comment by @akhmeteli - I just remembered the MT bottom pressure figure off the top of my head. However, the center of the Earth may be a different story - see the rest of the answer.
First, I suppose what you're really wanting to talk about here is not a "gun type" bomb where you have the two pieces crash together. That usually uses uranium-235 ($^{235}\mathrm{U}$), and actually doesn't require a lot of pressure - that material is volatile enough that you just need proximity: the trick is actually just moving the two pieces fast enough that a pre-ignition doesn't cause them to burst before their full energy yield can be achieved (a "fizzle"). The type that requires pressure like you're thinking is the "crush type", which uses plutonium-239 ($^{239}\mathrm{Pu}$), so that's the bomb we'll consider here.
The way this type of bomb works is that it uses some very carefully machined and shaped chemical explosives to create a highly symmetric "crush" around a spherical wad of the plutonium material. This raises the density to a point sufficient for a chain reaction (i.e. past the criticality point, where one fission generates an average of one further fission). And so what you're asking here is whether that the oceanic pressure can provide enough pressure to crush the plutonium to that level. Especially given that hydrostatic pressure is more-or-less uniform and symmetric, which is required of the compression so it actually increases the density as opposed to just squashing it (famous phrase from the Manhattan Project was that achieving this compression was like "trying to figure out how to crush a beer can without spilling any of the beer").
And now, according to [1], at least for one chemical explosive (RDX), the detonation pressure generated is between 8-15 kbar and may go as high as 65 kbar with suitable preparation. That means up to 6.5 GPa in modern, SI units, but perhaps as low as 0.8-1.5 GPa.
The pressure at bottom of Challenger Deep in the Marianas Trench is the deepest part of the Earth's ocean. Pressure there is around 100 MPa or 0.1 GPa, so clearly not even up to the lower limit of explosive pressures, though just barely within an order of magnitude.
What would seem to surely be enough, though, given the ocean is out, would be the compression deep within the Earth's solid mass itself. This begins at that 0.1 GPa level just mentioned and then at the very center rises to an incredible 360 GPa. The Young's modulus of plutonium, which approximately determines the scale of pressure at which it becomes compressible like a gas, is 96 GPa, hence we can expect fairly dramatic compression at the 360 GPa level. So I suspect that the focusing in the bomb probably raises the pressure significantly, to maybe on the order of Young's modulus or higher given the 2-3x compression factor cited by the other answer (but also, then, definitely not "to the level of the Sun's core" - that kind of pressure is only reached after fission commences, as a result of said fission, and moreover is explosive, not implosive, pressure).
Nonetheless, though, it is quite unlikely this could actually be used to explode a core. For one thing, the temperature rises rapidly with depth, and while the melting point of materials generally also rise with increasing compression (that's how the Earth's inner core, made of iron, can be solid despite the temperature being multiples of its sea-level melting point of 1811 K), if that melting point doesn't rise fast enough and/or with the right profile, then the nuclear core would likely melt, and thus disperse, well before it got deep enough to be compressed in the symmetrical manner that we want.
And that's not the only complication: even if you could keep the sphere from melting, the compression is going to be gradual due to the (likely) gravitationally-powered descent, while the compression by chemical explosive is effectively instant. This means that even before the critical point is reached, and slightly after it is reached, fission rates will rise and thus power developed from fission will rise, too. There's a good chance that this gradual compression causes just enough further energy to be released from fission to disperse the core (at least melt it, if not cause a "slight" [in nuclear terms] explosion a la Chernobyl), while also not being enough to actually achieve anywhere close to the full potential yield. In other words, you get a "fizzle" again with this approach.
But if you're just interested in the magnitude of the pressure, then no to the ocean, quite reasonably yes to the deep interior of Earth.
A: A significant nuclear yield cannot be achieved as others have explained.  Suggest you look up discussions on the web for the soviet submarine K-129 that sank with its nuclear weapons in 1968.
A: In response to The_Sympathizer, it is possible to construct explosive systems which are capable of compressing matter to such an extent that the volume occupied by the matter is reduced to 1/2 to 1/3rd of its original volume. Those systems, called implosion lenses, can render a subcritical mass of Pu-239 supercritical, triggering a chain reaction. As pointed out by others here, the pressures developed by such an implosion are enormously greater than those found at the bottom of the deepest ocean on earth.
This means you can drop a subcritical Pu pit to the bottom of the ocean, and it will not go critical.
